#!/bin/bash
server_id1=`ps -ef|grep "renren-fast-3.0.0.jar"|grep -v grep|awk '{print $2}'`
echo $server_id1
if [ -n "$server_id1" ];then
 echo "强制关闭进程1，pid:$server_id1"
  kill -9 $server_id1
fi

rm -rf /opt/luanchuan/renren-fast-3.0.0.jar

#nohup java -jar /opt/luanchuan/renren-fast.jar >> /opt/luanchuan/renren-fast.out 2>&1 &
cp ./target/renren-fast-3.0.0.jar /opt/luanchuan/ && nohup java -server -Xms256m -Xmx1024m -XX:NewSize=256m -jar /opt/luanchuan/renren-fast-3.0.0.jar --server.port=8081  >> /opt/luanchuan/renren-fast.out 2>&1 &
echo "正在启动 renren-fast。。。。。" >> /opt/luanchuan/renren-fast.out

